package com.seckill.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class DataSync {
    @Autowired
    private StringRedisTemplate redisTemplate;

    @PostConstruct
    public void initData() {
        redisTemplate.opsForValue().set("goodsId:" + "1", "1000");
    }
}
